Class java.awt.CardLayout
All Packages This Package Previous Next
Class java.awt.CardLayout
java.lang.Object
|
+----java.awt.CardLayout
-
public class
CardLayout
-
extends Object
-
implements LayoutManager
A layout manager for a container that contains several
'cards'. Only one card is visible at the same time,
allowing you to flip through the cards.
-
Version:
-
1.9 08/19/95
-
Author:
-
Arthur van Hoff
-
CardLayout()
-
Creates a new card layout.
-
CardLayout(int, int)
-
Creates a card layout with the specified gaps.
-
addLayoutComponent(String, Component)
-
Adds the specified component with the specified name to the layout.
-
first(Container)
-
Flip to the first card.
-
last(Container)
-
Flips to the last card of the specified container.
-
layoutContainer(Container)
-
Performs a layout in the specified panel.
-
minimumLayoutSize(Container)
-
Calculates the minimum size for the specified panel.
-
next(Container)
-
Flips to the next card of the specified container.
-
preferredLayoutSize(Container)
-
Calculates the preferred size for the specified panel.
-
previous(Container)
-
Flips to the previous card of the specified container.
-
removeLayoutComponent(Component)
-
Removes the specified component from the layout.
-
show(Container, String)
-
Flips to the specified component name in the specified container.
-
toString()
-
Returns the String representation of this CardLayout's values.
CardLayout
public CardLayout()
-
Creates a new card layout.
CardLayout
public CardLayout(int hgap,
int vgap)
-
Creates a card layout with the specified gaps.
-
Parameters:
-
hgap
-
the horizontal gap
-
vgap
-
the vertical gap
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
-
Adds the specified component with the specified name to the layout.
-
Parameters:
-
name
-
the name of the component
-
comp
-
the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component comp)
-
Removes the specified component from the layout.
-
Parameters:
-
comp
-
the component to be removed
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
-
Calculates the preferred size for the specified panel.
-
Parameters:
-
parent
-
the name of the parent container
-
Returns:
-
the dimensions of this panel.
-
See Also:
-
minimumSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
-
Calculates the minimum size for the specified panel.
-
Parameters:
-
parent
-
the name of the parent container
-
Returns:
-
the dimensions of this panel.
-
See Also:
-
preferredSize
layoutContainer
public void layoutContainer(Container parent)
-
Performs a layout in the specified panel.
-
Parameters:
-
parent
-
the name of the parent container
first
public void first(Container parent)
-
Flip to the first card.
-
Parameters:
-
parent
-
the name of the parent container
next
public void next(Container parent)
-
Flips to the next card of the specified container.
-
Parameters:
-
parent
-
the name of the container
previous
public void previous(Container parent)
-
Flips to the previous card of the specified container.
-
Parameters:
-
parent
-
the name of the parent container
last
public void last(Container parent)
-
Flips to the last card of the specified container.
-
Parameters:
-
parent
-
the name of the parent container
show
public void show(Container parent,
String name)
-
Flips to the specified component name in the specified container.
-
Parameters:
-
parent
-
the name of the parent container
-
name
-
the component name
toString
public String toString()
-
Returns the String representation of this CardLayout's values.
-
Overrides:
-
toString in class Object
All Packages This Package Previous Next